jsun.run(function() {

function SetWord() {
   jsun.swap.DictRec.Rec = this.firstChild.textContent;
   if (jsun.swap.DictRec.Row)
       jsun.swap.DictRec.Row.setAttribute("class", "");
   this.setAttribute("class", "SetWord");
   jsun.swap.DictRec.Row = this;
}
function IsertWord() {
    jsun.swap.DictRec.Rec = this.firstChild.textContent;
    jsun("#F_" + jsun("#text_i").value).value += this.firstChild.textContent;
    return jsun.dialog.active.close();
}

var body = jsun("#RecTable").firstChild;
for (var i = 1; i < body.childNodes.length; ++i) {
   jsun.dom.mix(body.childNodes[i]).event({ onclick: SetWord });
   jsun.dom.mix(body.childNodes[i]).event({ ondblclick: IsertWord });
}

});